<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function fun (n) {
            if(n === 0){
                return 1

            }
           return  n * fun(n-1)
        }
        var num = fun(5)
        console.log(num)


        function fn(n){

          for(var i = 0 ; i <= n ; i++){
           if(fn(n) == fn(n-1) + fn(n-2)){
               return 
           }
          }
        }
        fn(20);
    </script>
</body>
</html>